<?php
/**
 *
 * Erzeugt einen Hyperlink
 * @param unknown_type $name displayname des links
 * @param unknown_type $destination ziel url
 * @param unknown_type $query_string ggf get parameter uebergeben
 * @return string
 */
function get_link($name, $destination="", $query_string="")
{
	$destination = $destination ? $destination : $name;
	$query_string = $query_string ? "?".$query_string : "";
	return "<a href='$destination.php$query_string'>$name</a><br />\n";
}

/**
 *
 * fuellt links in index seite aus $exercises liste
 */
function get_links($link_names)
{
	$body = "";
	foreach ($link_names as $ln)
	{
		$body .= get_link($ln);
	}
	return $body;
}